<?php require_once 'header.php';?>
    <body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
    	
    	<div class="main">
    		<h2><?=$lang['titleAdmin'];?></h2>

<!-- menu -->
<?php require_once 'menu.php';?>
<!-- fin menu -->

    		<fieldset class="case1">
    		
    			<h3><?=$lang['AdminAddComp'];?> : </h3>
    			
    			<div class="case-light" id="case1">
<?php if(isset($msg)):?>
						<p><?=$msg;?></p>
<?php endif;?>  
				<form method="post" id="formcomp" name="formcomp" action="<?$_SERVER['PHP_SELF']?>">
					<div>
						<input type="text" name="name" placeholder="<?=$lang['AdminCompName'];?>"/> : <?=$lang['AdminCompName'];?>
					</div>
					<div>
						<input type="text" name="ckey" placeholder="<?=$lang['AdminCompKey'];?>"/> : <?=$lang['AdminCompKey'];?>
					</div>
					<div>
						<input type="text" name="email" placeholder="<?=$lang['AdminUserEmail'];?>"/> : <?=$lang['AdminUserEmail'];?>
					</div>
					<div>
						<input type="checkbox" name="notice"> : Recevoir un mail de notification de connexion ?
					</div>
					<div>
						<input type="hidden" name="validation" value="Valider">
						<div class="alone"><button type="button" name="valid" class="alone" onclick="formcomp.submit();"><?=$lang['formValidate'];?></button></div>
					</div>
				</form>
    		    </div>
    		    
    		</fieldset>
    		
    		<fieldset class="case2">
    		
    			<h3><?=$lang['admCompTitle'];?> :</h3>
    			
    			<div class="case-dark" id="case2">
    			<div class="section">
    			<?php $bg="section1";?>
				<?php while($user=mysql_fetch_array($dataUser)):?>
				<?php $bg=($bg=="section0")?"section1":"section0";?>
				<div class="<?=$bg;?>">
					<?=$user['computer']?>
					<div style="float: right;">
						<a href="modcomp.php?id=<?=$user['id_comp']?>"><?=$lang['formModify'];?></a> 
						<a href="javascript:DeleteComp('<?=$user['id_comp']?>');"><?=$lang['formDelete'];?></a>
					</div>	
				</div>
				<?php endwhile;?> 
				</div>
    		    </div>
    		    
    		</fieldset>
    		

    		

    		
    	</div>
    
    </body>
</html>